#include"comm.hpp"
#include<unistd.h>

int main()
{
    //1.获取key值
    key_t k = getKey();
    cout << "client: "<<toHex(k) << endl;

    //2.获取共享内存
    int shmid = getShm(k,gsize);
    cout << "client shmid: " << shmid << endl;

    //3.与共享内存关联
    char* start = attachShm(shmid);

    //4.解除与共享内存的关联
    detachShm(start);
    

    return 0;
}
